<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>JxLib Examples List</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../../lib/mootools-core.js" charset="utf-8"></script>
<script type="text/javascript" src="../../lib/mootools-more.js" charset="utf-8"></script>
<script type="text/javascript" src="../../lib/jxlib.standalone.uncompressed.js" charset="utf-8"></script>
<script src="js/locale.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../../lib/themes/crispin/jxtheme.css" type="text/css" media="screen" charset="utf-8">
<script type="text/javascript" charset="utf-8">

window.addEvent('load', function() {
    var tree = new Jx.Tree({parent: 'examplesIndex'});

    // randomly choose a language? it works ;)
    MooTools.lang.setLanguage(Cookie.read('jxtests.language') ? Cookie.read('jxtests.language') : 'en-US')

    var items = {
        'Jx-Examples': [
            {'About':'about.html'},
            {'Page-Layout' : [
                {'Layout' :'layout.html'},
                {'Splitter' : 'splitter.html'},
                {'Splitter-Integrated' : 'splitter_advanced.html'}
            ]},
            {'Panels-and-Dialogs' : [
                {'Panel' :'panel.html'},
                {'Panel-Set' : 'panelset.html'},
                {'Panels-Integrated' : 'panel_advanced.html'},
                {'Dialog' : 'dialog.html'},
                {'Dialogs-Integrated' : 'dialog_advanced.html'},
                {'Message-Dialogs-TBC' : 'dialog_messages.html'},
                {'File-Upload-Panel' : 'file_upload.html' }
            ]},
            {'Lists' : [ 
                {'Grid' : 'grid.html'},
                {'Paginated-Grid' : 'paging-grid.html'},
                {'Grid-Inline-Editor' : 'grid_editor.html'},
                {'Tree' : 'tree.html'},
                {'List-View' : 'list.html'}
            ]},
            {'Bars-and-Buttons' : [
                {'Toolbar' :'toolbar.html'},
                {'Buttons' : [
                    {'Basic' : 'button.html'},
                    {'Flyouts' : 'flyout.html'},
                    {'Flyouts-Integrated' : 'flyout_advanced.html'},
                    {'Multi' : 'multi.html'},
                    {'Color' : 'color.html'}
                ]},
                {'Tabs':[
                    {'Tabs' : 'tab.html'},
                    {'Tab-Set' : 'tab_set.html'},
                    {'Tabs-Integrated' : 'tab_box_advanced.html'}
                ]},
                {'Menus': [
                    {'Menu-button' : 'menu.html'},
                    {'Menu-bar' : 'menu_bar.html'},
                    {'Context-Menu' : 'menu_context.html'}
                ]}
            ]},
            {'Extras' : [
                {'Forms' : 'forms.html'},
                {'Notification' : 'notification.html'},
                {'Custom-Scrollbars' : 'custom_scrollbars.html'},
                {'Progress-Bar' : 'progressbar.html'},
                {'Slider' : 'slider.html'}
            ]},
            {'Adaptors' : [
                {'Jx.Tree': 'tree_adaptors.html'},
                {'Jx.Field.Combo': 'adaptor_combo.html' }
            ]}
        ]
    };

    var makeTreeItem = function(o, tree) {
        for (var i in o) {
            var v = o[i];
            if (v instanceof Array) {
                var folder = new Jx.TreeFolder({label: {set:'Examples',key:'navigation',value:i}, open: true});
                for (var j=0; j<v.length; j++) {
                    makeTreeItem(v[j], folder);
                }
                tree.add(folder);
            } else {
                var item = new Jx.TreeItem({
                    label: {set:'Examples',key:'navigation',value:i},
                    onClick: function() {
                        parent.test.location.href=v;
                        Cookie.write('JxExamples.CurrentExample', v);
                    }
                });
                tree.add(item);
            }
        }
    };
    makeTreeItem(items, tree);
    
    var defaultPage = Cookie.read('JxExamples.CurrentExample');
    if (defaultPage) {
        parent.test.location.href=defaultPage;
    }
    if (Browser.Engine.trident4) {
        new Asset.css('../../lib/themes/crispin/ie6.css', { rel: 'stylesheet' });
    }
    if (Browser.Engine.trident5) {
        new Asset.css('../../lib/themes/crispin/ie7.css', { rel: 'stylesheet' });
    }

});
</script>
<link rel="stylesheet" href="css/list.css" type="text/css" media="screen" title="" charset="utf-8">
</head>
<body>
<div id="examplesIndex"></div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-124914-7");
pageTracker._trackPageview();
</script>
</body>
</html>
